<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('yp','com_default-header'); ?>
<!--主体-->
<div class="main_all">
<div id="main">
  <!--右侧-->
  <div id="right">
    <p id="position"><strong>当前位置</strong>：<?php echo $position;?></p>
    <h3><?php echo $system_name[$category];?></h3>
    <div class="box p_l_20">
      <ul class="txt_list">
        <li><B>职位名称</B>：<?php echo $title;?></li>
        <li><B>工作地点</B>：<?php echo $workplace;?></li>
        <li><B>招聘人数</B>：<?php echo $employ;?></li>
        <li><B>工作经验</B>：<?php echo $experience;?></li>
        <li><B>工作性质</B>：<?php echo $worktype;?></li>
        <li><B>工作性质</B>：<?php echo $worktype;?></li>
        <li><B>性别要求</B>：<?php echo $sex;?></li>
        <li><B>学历要求</B>：<?php echo $degree;?></li>
        <li><B>月薪</B>：<?php echo $pay;?></li>
<li><B>更新时间</B>：<?php echo date("Y-m-d",$updatetime);?></li>
        <li><B>有效期</B>：<?php echo $period;?>天</li>
        <li><B>职位描述</B>：<BR><?php echo $content;?></li>		
      </ul>
<ul align="right" style="margin:10px;"><span class="two_button"></a><a href="javascript:void(0)" onclick="javascript:postapply(<?php echo $id;?>);"><img src="templates/default/yp/images/job_join.gif" border="0"/></a> <a href="javascript:void(0)" onclick="javascript:favorapply(<?php echo $id;?>);"><img src="templates/default/yp/images/job_shou.gif" border="0"/></a></span></ul>
  <h4>联系方式</h4>
  <ul class="txt_list">
        <li>电话：<?php echo magic_image($telephone);?></li>
        <li>传真：<?php echo magic_image($fax);?></li>
        <li>邮箱：<?php echo magic_image($email);?></li>
        <li>地址：<?php echo $address;?></li>
        <li>邮编：<?php echo $zip;?></li>
      </ul>
      <div class="cb"></div>
     
    </div>
  </div>
  <!--左侧-->
  <div id="left">
<?php if($m_user) { ?>
<h3>热点导航</h3>
<div class="hot_nav">
  <ul>
<?php if(is_array($m_user)) foreach($m_user AS $ms) { ?>
  <li><a href="<?php echo $ms['url'];?>"><?php echo $ms['catname'];?></a></li>
<?php } ?>
  </ul>
</div>
<?php } ?>
<h3>最新消息</h3>
    <div class="box">
      <ul>
<?php $DATA = get("SELECT * FROM `phpcms_yp_news` WHERE `userid`='$userid' AND status=99 ORDER BY id DESC", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><a href="<?php echo show_url('news',$r[id]);?>" title="<?php echo $r['title'];?>"><?php echo str_cut($r[title],28,'');?></a></li>
<?php } unset($DATA); ?>
      </ul>
    </div>
<h3>站内搜索</h3>
    <form class="box" action="<?php echo $M['url'];?>web/query.php">
      <input type="text" name="q" size="16"/><input name="search" type="submit" id="search" value="搜索"/><br/>
  <input type="radio" name="type" checked="checked" value="product"/>商品<input type="radio" name="type" value="buy"/>商机<input value="news" type="radio" name="type"/>新闻<input type="hidden" value="search" name="action" /><input name="userid" value="<?php echo $userid;?>" type="hidden" />
    </form>
  </div>
  <div class="cb"></div>
</div>
</div>
<!--尾部-->
<div id="foot"><?php echo $companyname;?><br/> 地址：<?php echo $address;?></div>
<script type="text/javascript">
var postapply =  function(jobid)
{
$.get("<?php echo $M['url'];?>myjob.php",{'action':'postapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("简历投递成功");else if(data == '0') alert("您已经申请过这个职位了");else if(data == '-3') alert("这个职位已经过期了");else{window.location.href="<?php echo $MODULE['member']['url'];?>login.php?forward="+encodeURI(window.location.href);}});
}

var favorapply =  function(jobid)
{
$.get("<?php echo $M['url'];?>myjob.php",{'action':'favorapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("职位收藏成功");else if(data == '0')  alert("您已经收藏过这个职位了");else{window.location.href="<?php echo $MODULE['member']['url'];?>login.php?forward="+encodeURI(window.location.href);}});
}
</script>
</body>
</html>